import Layout from '@/layout'

let menuRouter
/**菜单路由*/
menuRouter = [
    {
        path: '',
        name: 'dashboard',
        component: Layout,
        redirect: 'index',
        children: [
            {
                path: 'index',
                component: (resolve) => require(['@/views/dashboard/index'], resolve),
                name: 'index',
                meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
            }
        ]
    },
    {
        path: '/component',
        name: 'component',
        component: Layout,
        meta: { title: '组件', icon:'edit' },
        alwaysShow: true,
        children: [
            {
                path: 'table',
                name: 'table',
                component: (resolve) => require(['@/views/component/table'], resolve),
                meta: { title: '表分页',icon: 'edit' }
            },
            {
                path: 'calendar',
                name: 'calendar',
                component: (resolve) => require(['@/views/component/Calendar'], resolve),
                meta: { title: '日历',icon: 'edit' }
            }
        ]
    },
    {
        path: '/test',
        name: 'test',
        component: Layout,
        meta: { title: '测试页面', icon:'edit' },
        alwaysShow: true,
        children: [
            {
                path: 'test1',
                name: 'test1',
                alwaysShow: true,
                component: (resolve) => require(['@/views/test/test1'], resolve),
                meta: { title: 'test1',icon: 'edit' },
                children: [
                    {
                        path: 'test2',
                        name: 'test2',
                        component: (resolve) => require(['@/views/test/test2'], resolve),
                        meta: { title: 'test2',icon: 'edit' }
                    }
                ]

            },

        ]
    }
]

export default menuRouter;
